Subject: Re: My 3d proggy
From: "Andrew Church" <[email-masked]>
To: "amos-list" <[email-masked]>
Date: 17 Sep 93 11:33:00 EST

>* Is it possible to have a library procedure in a compiled state, and access
>  it from an uncompiled program? ie Can I paste a compiled program into an
>  uncompiled program and call it only when needed?

  Only if it was compiled with the same system it's being run on.  I.E. if
you're using AMOS 1.x, you can only include AMOS 1.x compiled procedures, and
likewise for Pro.  This will cause a problem if you intend to distribute the
program as an AMOS file, as not everybody has the same system.

  You'll also have to fool around with the AMOS file in a binary editor if you
want to have more than one, as they'd all be called COMPILED.  You might
change the extra ones to COMPILE0 or something.

>* Is it possible to call OTHER programs (either Amos or compiled to cli progs)
>  from an amos program?  ie Can I compile the library and call it if it is
>  EXTERNAL to the program using it?

  You can run a CLI-compiled program using Pro's Exec command or Doscall(-222)
(which is Execute()) in AMOS 1.3.  If you use the Doscall method, the string
to execute must be terminated with Chr$(0) and placed in Dreg(1), and Dreg(2)
and Dreg(3) must be 0.

  Since an AMOS-compiled program is just a compiled procedure, see above for
that.

>* I need to pass data to the library before I call it.  I figure the best way
>  to do this is to use a temporary bank, but I'm not sure how to access each
>  element in the bank (Poke and Peek?.....haven't got to this section of the
>  manual yet!).

  Use the Dreg() and Areg() arrays.

  (sorry, out of time...)

  --Andy Church